odate; //$customer = $data->customer; //$menus = $data->menus; $items = $data->items; $qty = $data->qty; //$ucost = $data->ucost; $orderno = $data->orderno; if(($items =='') or ($qty == '') ) { echo "No field Must be Empty, Fill the Fields approprietly." ; } else { $gd = $DBcon->prepare("select * from stock_prices where item_name =:nn") ; $gd->bindparam(":nn",$items) ; $gd->execute() ; $rgd = $gd->fetch(pdo::FETCH_ASSOC) ; $cat = $rgd['item_category'] ; $price = $rgd['prices'] ; $tct = $qty * $price ; $inserts = $DBcon->prepare("insert into temp_sales(ucid,item_category,item_name,qty,unitcost,totalcost)values(:a,:b,:c,:d,:e,:f)") ; $inserts->bindparam(":a",$orderno) ; $inserts->bindparam(":b",$cat) ; $inserts->bindparam(":c",$items) ; $inserts->bindparam(":d",$qty) ; $inserts->bindparam(":e",$price) ; $inserts->bindparam(":f",$tct) ; $inserts->execute() ; $sel = $DBcon->prepare("select * from temp_sales where ucid = '$orderno'") ; $sel->execute() ; $count = 0 ; //GET TOTAL SUM $tsum = $DBcon->prepare("select sum(totalcost) as amt from temp_sales where ucid = '$orderno'") ; $tsum->execute() ; $trow = $tsum->fetch(pdo::FETCH_ASSOC) ; $amto = $trow["amt"] ; ?>
fetch(pdo::FETCH_ASSOC) ) { $count++ ; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; //$tcost = $row['quantity'] * $row['unitcost'] ; ?> " ; } ?>
SN ITEM CATEGORY ITEMS QUANTITY UNIT-COST TOTAL ACTION
".$count."".$row['item_category']."".$row['item_name']."".$row['qty']."".$row['unitcost']." Del
        Grand Total